package com.runa.rccprotocol.flightControl;

import lombok.Data;

/**
 * 2024/9/6 10:04
 * zhangYB
 */
@Data
public class LoginResponse extends Response {


    private TokenResponse object;

    private Long expireTime;

    public LoginResponse() {
    }

    public LoginResponse(Integer code) {
        super(code);
    }

    public LoginResponse(Integer code, String message) {
        super(code, message);
    }

    public String getAuthorization() {
        return object.getTokenHead() + " " + object.getToken();
    }


    public boolean expired() {
        return null != expireTime && System.currentTimeMillis() > expireTime;
    }


}
